package main

import "strings"

func main() {
	findRepeatedDnaSequences("AAAAAAAAAAAA")
}
func findRepeatedDnaSequences(s string) []string {
	retMap := make(map[string]int)
	for i := 0; i < len(s)-9; i++ {
		searchInString := s[i+1:]
		searchString := s[i:i+10]
		if strings.Contains(searchInString, searchString){
			retMap[s[i:i+10]]=0
		}
	}
	var ret []string
	for k,_ := range retMap {
		ret = append(ret, k)
	}
	return ret
}

